import { createRouter, createWebHistory } from 'vue-router'
import Home from '@/views/mainPage.vue'
import Setting from '@/views/Setting'
import Server from '@/views/Server'
import Topic from '@/views/Topic'
import Consume from '@/views/Consume'


const routes = [
  {
    path: '/',
    name: 'Home',
    component: Home,
    children:[
      {
        path: '/setting',
        name: 'Setting',
        component: Setting,
        children:[
          {
            path: '/server',
            name: 'Server',
            component: Server
          },
          {
            path: '/topic',
            name: 'Topic',
            component: Topic
          }
        ]
      },

      {
        path: '/consume',
        name: 'Consume',
        component: Consume
      }
    ]
  }
]

const router = createRouter({
  history: createWebHistory(),
  routes
})

export default router
